<%@ page contentType="text/html;charset=UTF-8" language="java" 
%><%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"
%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
  	<title>EFFEL</title>
  	<link rel="stylesheet" type="text/css" href="main.css"></link>
  </head>
  <body>
  <div class="menu"><div class="menu"><stripes:form beanclass="ru.nsu.effel.actions.AuthorizationControllerActionBean">
	<stripes:submit name="logout" value="Logout"/>
	</stripes:form></div></div>
  <stripes:useActionBean beanclass="ru.nsu.effel.actions.AccountActionBean" var="account"/>
  <stripes:useActionBean beanclass="ru.nsu.effel.actions.EmployeeProfileActionBean" var = "bean"/>
  <stripes:form beanclass="ru.nsu.effel.actions.ManagerProfileActionBean" method="post">
  	<stripes:errors/>
  	<p>Hello, ${account.fio}!</p>
	<table class="display">
      	<tr>
      		<th></th>
			<th>Connection Bid ID</th>
            <th>Tariff</th>
        </tr>
        <c:forEach items="${bean.newConnectionBids}" var="bid" varStatus="loop">
			<tr>
				<td><input type="radio" name="bidId" value="${bid.id}"/></td>
            	<td>${bid.id}</td>
            	<td>${bid.tariffname}</td>
			</tr>
        </c:forEach>
    </table>
    <div class="buttons">
  		<stripes:submit name="connectionBidInfo" value="Bid in details"/>
  	</div>
  	</stripes:form>
  	<stripes:form beanclass="ru.nsu.effel.actions.ManagerProfileActionBean" method="post">
  	<table class="display">
  		<tr>
      		<th></th>
			<th>Connection Bid ID</th>
            <th>First name</th>
            <th>Last name</th>
            <th>Address</th>
            <th>Tariff</th>
            <th>Status</th>
        </tr>
        <c:forEach items="${bean.managerConnectionBids}" var="bid" varStatus="loop">
			<tr>
				<td><stripes:checkbox name="bidIds" value="${bid.id}" checked="false"/></td>
            	<td>${bid.id}</td>
            	<th>${bid.firstName}</th>
            	<th>${bid.lastName}</th>
            	<th>${bid.address}</th>
            	<td>${bid.tariffname}</td>
            	<th>${bid.bidStatus}</th>
			</tr>
        </c:forEach>	
  	</table>
  	<div class="buttons">
  		<stripes:submit name="sendBidsToFitter" value="Send to fitter"/>
  	</div>
  	<div class="buttons">
  		<stripes:submit name="acceptDoneBids" value="Accept fitted"/>
  	</div>
  </stripes:form>
  </body>
</html>